package action;


import java.util.Iterator;
import java.util.List;

import org.apache.struts2.ServletActionContext;
import org.hibernate.Session;

import po.*;

import bean.EmailBean;
import bo.HibernateSessionFactory;

import com.opensymphony.xwork2.ActionSupport;

public class EmailDeleteB extends ActionSupport{
	private int id;
	
	public String execute(){
		
		

			
			Session session = HibernateSessionFactory.getSession();
	
				Email e = new EmailDAO().findById(id);
				e.setSendflag("3");
				session.save(e);	
			session.beginTransaction().commit();	

			return "Sended";
		
		

		
	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}
	
}
